<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('jifenbasic',$postdata);
		exi('设置成功');
	}
	$footernav4 =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_juanfee/creditshop.index4/'),
		array('title'=>'列表','icon'=>'icon-browse','action'=>'jy_juanfee/creditshop.goods4/'),
		array('title'=>'订单','icon'=>'icon-manageorder','action'=>'jy_juanfee/creditshop.log_list4/'),
		array('title'=>'日志','icon'=>'icon-wo1','action'=>'jy_juanfee/creditshop.creditlog4/'),
	);
	$footernav5 =array(
		array('title'=>'首页','icon'=>'icon-shouye','action'=>'jy_juanfee/creditshop.index5/'),
		array('title'=>'列表','icon'=>'icon-browse','action'=>'jy_juanfee/creditshop.goods5/'),
		array('title'=>'订单','icon'=>'icon-manageorder','action'=>'jy_juanfee/creditshop.log_list5/'),
		array('title'=>'日志','icon'=>'icon-wo1','action'=>'jy_juanfee/creditshop.creditlog5/'),
	);
	$plugins =$this->plugins();
	$return['item']=$this->plugin_setting('jifenbasic');
	$return['item']['demofooternav4'] = $footernav4;
	$return['item']['footernav4']=$return['item']['footernav4']?:$footernav4;
	$return['item']['demofooternav5'] = $footernav5;
	$return['item']['footernav5']=$return['item']['footernav5']?:$footernav5;
	$return['item']['plugins']=$return['item']['plugins']?$return['item']['plugins']:$plugins[1]['list'];
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'tabs'=>$tabs,
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'string','title'=>'兑换券商城名称','name'=>'title1'),
                    array('type'=>'string','title'=>'银豆商城名称','name'=>'title2'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo'),
					array('type'=>'switch','title'=>'是否关闭商户独立支付？','name'=>'noone_credit','isradio'=>1,'help'=>'关闭后，商户的独立积分商城，都统一使用总部的支付结算！'),
					array('type'=>'choose_many','title'=>'绑定核销员','name'=>'verifymids','action'=>'core/member.get_member/many/','choose_title'=>'选择会员',),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
            array(
                'title'=>'币兑换设置',
                'list'=>array(
                    array('type'=>'string_two','unit1'=>'个','title1'=>'能量值','unit2'=>'个','title2'=>'积分','title'=>'兑换券兑换','name1'=>'bi6to4','name2'=>'bi1to4','help'=>'能量值+积分=1张兑换券'),
                    array('type'=>'unitstring','unit'=>'个','title'=>'N个金豆兑换1个积分','name'=>'bi3to1'),
                    )
            ),
			array(
				'title'=>'退币设置',
				'list'=>array(
					array('type'=>'tip','title'=>'可以指定某些虚拟币兑换时，如果客户不想要商品，申请退款！将等额虚拟币退回到余额账号！'),
					array('type'=>'switch','title'=>'是否启用','name'=>'istui_fee','isradio'=>1),
					array('type'=>'checkbox','title'=>'支持的退币到余额的类型','name'=>'tui_feetype','options'=>'xunitype'),
				)
			),
			array(
				'title'=>'手续费设置',
				'list'=>array(
					array('type'=>'string','title'=>'累积多少手续费不再扣除','name'=>'shoufee_man'),
					array('type'=>'unitstring','unit'=>'%','title'=>'积分手续费','name'=>'shoufee_rate1'),
					array('type'=>'unitstring','unit'=>'%','title'=>$this->xunitype[3].'手续费','name'=>'shoufee_rate3'),
					array('type'=>'unitstring','unit'=>'%','title'=>$this->xunitype[4].'手续费','name'=>'shoufee_rate4'),
					array('type'=>'unitstring','unit'=>'%','title'=>$this->xunitype[5].'手续费','name'=>'shoufee_rate5'),
					array('type'=>'unitstring','unit'=>'%','title'=>$this->xunitype[6].'手续费','name'=>'shoufee_rate6'),
				)
			),
            array(
                'title'=>'注册奖励',
                'list'=>array(
                    array('type'=>'switch','name'=>'sign_open','title'=>'开启注册奖励','help'=>'开启后，注册会员，送币'),
                    array('type'=>'radio','title'=>'指定奖励类型','name'=>'sign_feetype','options'=>'xunitype','help'=>'签到奖励类型！'),
                    array('type'=>'unitstring','unit'=>'个','name'=>'sign_fee','title'=>'奖励数量','help'=>''),
                )
            ),
			array(
				'title'=>'幻灯片',
					'list'=>array(
						array(
							'type'=>'array',
							'title'=>'兑换券商城幻灯片',
							'name'=>'hdps01',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
						
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
									array('type'=>'link','name'=>'url','title'=>'幻灯片链接'),
									
								)
						),
                        array(
                            'type'=>'array',
                            'title'=>'兑银豆商城幻灯片',
                            'name'=>'hdps02',
                            'add_tip'=>'添加一个幻灯片',
                            'list'=>array(
                                array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
                                array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),

                            ),
                            'details'=>array(
                                array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
                                array('type'=>'link','name'=>'url','title'=>'幻灯片链接'),

                            )
                        )
					)
			),
			array(
				'title'=>'兑换券商城导航',
					'list'=>array(
									array('type'=>'updemo','name'=>'footernav4','demo'=>'demofooternav4','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
									array('type'=>'array','name'=>'footernav4','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'string','name'=>'icon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'string','name'=>'icon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
			array(
				'title'=>'银豆商城导航',
					'list'=>array(
									array('type'=>'updemo','name'=>'footernav5','demo'=>'demofooternav5','title'=>'重置导航','help'=>'不知道添加什么导航？重置默认的一下试试！'),
									array('type'=>'array','name'=>'footernav5','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'string','name'=>'icon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'string','name'=>'icon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									)
								),
					)
			)
		),
	);
	$return['xunitype']=$this->xuni_types;
	$return['htmls']=$htmls;
	exi($return);
}

